﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using System.Collections.ObjectModel;
using Tenmah.BusinessLogic.BusinessEntities;
using Tenmah.BusinessLogic;

namespace Tenmah.Web.Administrator
{
    public partial class Manage_groups : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void SortByNameLinkButton_Click(object sender, EventArgs e)
        {

        }
        protected void SortByYearLinkButton_Click(object sender, EventArgs e)
        {

        }
        protected void SortBySpecializationLinkButton_Click(object sender, EventArgs e)
        {

        }
        protected void SortByFacultyLinkButton_Click(object sender, EventArgs e)
        {

        }
        protected void GroupsRepeater_ItemCommand(object sender, RepeaterCommandEventArgs e)
        {

        }
        protected void DeleteGroupButton_Click(object sender, EventArgs e)
        {
            Collection<int> SelectedGroups = GetSelectedGroupsId();
            if (SelectedGroups.Count > 0)
            {

            }
        }
        public Collection<int> GetSelectedGroupsId()
        {
            Collection<int> GroupsID = new Collection<int>();
            foreach (RepeaterItem item in GroupsRepeater.Items)
            {
                HiddenField GroupIdHiddenField = (HiddenField)(item.FindControl("GroupIdHiddenField"));
                GroupsID.Add(Convert.ToInt32(GroupIdHiddenField.Value));
            }
            return GroupsID;
        }

    }
}
